package com.ruoyi.dict.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dict.mapper.TDictPurchaseOrderStatusMapper;
import com.ruoyi.dict.domain.TDictPurchaseOrderStatus;
import com.ruoyi.dict.service.ITDictPurchaseOrderStatusService;

/**
 * 采购单状态字典Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TDictPurchaseOrderStatusServiceImpl implements ITDictPurchaseOrderStatusService 
{
    @Autowired
    private TDictPurchaseOrderStatusMapper tDictPurchaseOrderStatusMapper;

    /**
     * 查询采购单状态字典
     * 
     * @param code 采购单状态字典主键
     * @return 采购单状态字典
     */
    @Override
    public TDictPurchaseOrderStatus selectTDictPurchaseOrderStatusByCode(String code)
    {
        return tDictPurchaseOrderStatusMapper.selectTDictPurchaseOrderStatusByCode(code);
    }

    /**
     * 查询采购单状态字典列表
     * 
     * @param tDictPurchaseOrderStatus 采购单状态字典
     * @return 采购单状态字典
     */
    @Override
    public List<TDictPurchaseOrderStatus> selectTDictPurchaseOrderStatusList(TDictPurchaseOrderStatus tDictPurchaseOrderStatus)
    {
        return tDictPurchaseOrderStatusMapper.selectTDictPurchaseOrderStatusList(tDictPurchaseOrderStatus);
    }

    /**
     * 新增采购单状态字典
     * 
     * @param tDictPurchaseOrderStatus 采购单状态字典
     * @return 结果
     */
    @Override
    public int insertTDictPurchaseOrderStatus(TDictPurchaseOrderStatus tDictPurchaseOrderStatus)
    {
        return tDictPurchaseOrderStatusMapper.insertTDictPurchaseOrderStatus(tDictPurchaseOrderStatus);
    }

    /**
     * 修改采购单状态字典
     * 
     * @param tDictPurchaseOrderStatus 采购单状态字典
     * @return 结果
     */
    @Override
    public int updateTDictPurchaseOrderStatus(TDictPurchaseOrderStatus tDictPurchaseOrderStatus)
    {
        return tDictPurchaseOrderStatusMapper.updateTDictPurchaseOrderStatus(tDictPurchaseOrderStatus);
    }

    /**
     * 批量删除采购单状态字典
     * 
     * @param codes 需要删除的采购单状态字典主键
     * @return 结果
     */
    @Override
    public int deleteTDictPurchaseOrderStatusByCodes(String[] codes)
    {
        return tDictPurchaseOrderStatusMapper.deleteTDictPurchaseOrderStatusByCodes(codes);
    }

    /**
     * 删除采购单状态字典信息
     * 
     * @param code 采购单状态字典主键
     * @return 结果
     */
    @Override
    public int deleteTDictPurchaseOrderStatusByCode(String code)
    {
        return tDictPurchaseOrderStatusMapper.deleteTDictPurchaseOrderStatusByCode(code);
    }
}